
package org.mikrosopht.client;

import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.Window;
import com.google.gwt.gen2.table.client.PagingScrollTable;
import com.google.gwt.gen2.table.client.TableModel;
import com.google.gwt.gen2.table.client.FixedWidthFlexTable;
import com.google.gwt.gen2.table.client.FixedWidthGrid;
import com.google.gwt.gen2.table.client.TableDefinition;

public class PagingScrollTableInitialSorting<RowType> extends PagingScrollTable {

  public PagingScrollTableInitialSorting(TableModel<RowType> tableModel, FixedWidthGrid dataTable, 
                                         FixedWidthFlexTable headerTable, TableDefinition<RowType> tableDefinition) {
    super(tableModel, dataTable, headerTable, tableDefinition);
  }

  public void setSortIndicator(int column, boolean ascending) {
    Element cellElem = getHeaderTable().getCellFormatter().getElement(0, column);
    applySortedColumnIndicator(cellElem, ascending);
  }
}
